﻿using M.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


namespace M.EntityConfigurations
{
    public class PlayerConfiguration : IEntityTypeConfiguration<Player>
    {
        public void Configure(EntityTypeBuilder<Player> builder)
        {
            builder.HasOne(x=>x.Resume)
                .WithOne(x => x.Player)
                .HasForeignKey<Resume>(x => x.PlayerId);                
        }
    }
}